#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
int my_strcmp(const char* str1, const char* str2)
{
	assert(str1 && str2);
	while (*str1 == *str2)
	{
		if (*str1 == '\0')
			return 0;
		str1++;
		str2++;
	}
	if (*str1 > *str2)
		return 1;
	else
		return -1;
}
int main()
{
	char arr1[] = "abc";
	char arr2[] = "abcd";
	int ret1 = my_strcmp(arr1, arr2);
	printf("%d\n", ret1);
	int ret2 = my_strcmp(arr2, arr1);
	printf("%d\n", ret2);
	int ret3 = my_strcmp(arr1, arr1);
	printf("%d\n", ret3);
	return 0;
}